import django
from celery import Celery
from django.conf import settings
import os

# 项目环境添加值
os.environ.setdefault('DJANGO_SETTINGS_MODULE','recommand_demo.settings')
django.setup()
# 初始化celery
app = Celery('recommand_demo')

app.conf.update(
    broker_url = 'redis://:@127.0.0.1:6379/6'
)
app.autodiscover_tasks(settings.INSTALLED_APPS)